#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int mod = 1000000007;
int main()
{
	char s[1100];
	while(scanf("%s",s+1)!=EOF)
	{
		s[0] ='b';
		int len = strlen(s);
		long long ans = 0;
		for(int i = 0;i<len;i++)
		{
			ans = ((ans*26)%mod+(s[i]-'a'))%mod;
		}
		printf("%I64d\n",ans);
	}
}
